<?php echo $header; ?>
<div class="container"><?php echo $column_left; ?><?php echo $column_right; ?>
  <div id="content"><?php echo $content_top; ?>
    <div class="breadcrumb">
      <?php foreach ($breadcrumbs as $breadcrumb) { ?>
      <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
      <?php } ?>
    </div>
    <div class="heading">
      <h1><?php echo $heading_title; ?></h1>
    </div>
      <form method="post" action="<?php echo $action; ?>" enctype="multipart/form-data" id="form">
      	<div>
	        <div class="span2"><span class="required">*</span> <?php echo $entry_subject; ?></div>
	        <div class="span8"><input class="input-xxlarge" name="subject" type="text" value="<?php echo $subject; ?>" /></div>
              <?php if ($error_subject) { ?>
              <div class="span10 offset2"><span class="error"><?php echo $error_subject; ?></span></div>
              <?php } ?>
        </div>
            
        <div>
	        <div class="span2"><span class="required">*</span> <?php echo $entry_department; ?></div>
	        <div class="span8"><select name="department">
	        <?php foreach ($departments as $depart){ ?>
	        	<option <?php if ($depart['department_id'] == $department){ ?>selected="selected"<?php } ?> value="<?php echo $depart['department_id']; ?>"><?php echo $depart['department_name']; ?></option>
	        <?php } ?>
	        </select></div>
	    </div>
	    
	    <div>
	    	<div class="span2"><?php echo $entry_message; ?></div>
            <div class="span8"><textarea rows="3" name="message"><?php echo $message; ?></textarea></div>
            <?php if ($error_message) { ?>
              <div class="span10 offset2"><span class="error"><?php echo $error_message; ?></span></div>
              <?php } ?>
	    </div>
	    
	    <div>
	        <div class="span2"><?php echo $entry_attach; ?></div>
	        <div class="span8 fileupload fileupload-new" data-provides="fileupload">
			  <div class="input-append">
			    <div class="uneditable-input span3">
				    <i class="icon-file fileupload-exists"></i> 
				    <span class="fileupload-preview"></span>
			    </div>
			    <span class="btn btn-file">
			    	<span class="fileupload-new">Select file</span>
			    	<span class="fileupload-exists">Change</span>
			    	<input class="attach-file" type="file" name="file" />
			    </span>
			    <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
			  </div>
	        </div>
	        <?php if ($error_attach) { ?>
              <div class="span10 offset2"><span class="error"><?php echo $error_attach; ?></span></div>
              <?php } ?>
	    </div>
      </form>
    <div class="span4 offset4">
      <a class="btn btn-success btn-save" onclick="$('#form').submit();" ><span><?php echo $button_save; ?></span></a>
      <a class="btn btn-danger" style="color: white;" href="<?php echo $cancel; ?>"><span><?php echo $button_cancel?></span></a>
    </div>
    <?php echo $content_bottom; ?></div>
</div>
<?php echo $footer; ?>